<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<jsp:include page="../common/file.jsp" />
<head>
</head>
<body>
	<script type="text/javascript">
		//初始化滚动条
		$("html").niceScroll({cursorcolor:"#000000",zindex:999999,bouncescroll:true,cursoropacitymax:0.4,cursorborder:"",cursorborderradius:7,cursorwidth:"7px",background:"rgba(0,0,0,.1)",autohidemode:true,railpadding:{top:0,right:2,left:2,bottom:0}});
		//页面信息提示
		var returnMsg = "${_error}";
		var authoriMsg = "${_authoriError}";
	</script>
	<div id="title-breadcrumb-option-demo" class="page-title-breadcrumb">
		<ol class="breadcrumb page-breadcrumb pull-left">
			<li><i class="fa fa-home"></i>&nbsp;<a href="${pageContext.request.contextPath}/apiException/list">日志管理</a>&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;</li>
			<li class="active">接口异常</li>
		</ol>
	</div>
	<div style="clear: both"></div>
	<div class="main-right-content">
		<div class="main-right-div">
			<div class="main-right-query-div">
				<form id="query-form-1" action="${pageContext.request.contextPath}/apiException/list" method="post">
					<div class="main-right-search row">
						<div class="col-lg-2">
							开始时间:<input type="text" class="Wdate" id="startDate"
								name="startDate"
								onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'endDate\')}',skin:'twoer',dateFmt:'yyyy-MM-dd'})"
								maxlength="50" readonly="readonly" value="${apiException.startDate }"/>
						</div>
						<div class="col-lg-2">
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;到:<input type="text" class="Wdate" id="endDate" name="endDate"
								onfocus="WdatePicker({minDate:'#F{$dp.$D(\'startDate\')}',skin:'twoer',dateFmt:'yyyy-MM-dd'})"
								maxlength="50" readonly="readonly" value="${apiException.endDate }"/>
						</div>
						<div class="col-lg-2">
						&nbsp;&nbsp;&nbsp;&nbsp;账号:<input type="text" id="account" name="account" value="<c:out value='${apiException.account}'/>" placeholder="请输入微信号" onkeyup="this.value=this.value.replace(/ /g,'')" maxlength="32" />
						</div>
						<div class="col-lg-2">
						服务名称:<input type="text" id="serviceName" name="serviceName" value="<c:out value='${apiException.serviceName}'/>" placeholder="请输入服务名称" onkeyup="this.value=this.value.replace(/ /g,'')" maxlength="64" />
						</div>
						<div class="col-lg-2">
						接口名称:<input type="text" id="apiName" name="apiName" value="<c:out value='${apiException.apiName}'/>" placeholder="请输入接口名称" onkeyup="this.value=this.value.replace(/ /g,'')" maxlength="32" />
						</div>
						<div class="col-lg-2">
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<button type="button" class="btn btn-blue btn-query">查 询</button>
							<button type="button" class="btn btn-gray btn-rest">重 置</button>
						</div>
					</div>
				</form>
			</div>
			<div style="clear: both;"></div>
			<div class="main-right-table-div">
				<table class="main-right-table">
					<colgroup>
						<col style="width: 5%;">
						<col style="width: 5%;">
						<col style="width: 5%;">
						<col style="width: 25%;">
						<col style="width: 5%;">
					</colgroup>
					<thead>
						<tr>
							<td>账号号</td>
							<td>服务名称</td>
							<td>接口名称</td>
							<td>异常原因</td>
							<td>创建时间</td>
						</tr>
					</thead>
					<tbody>
						<c:if test="${list != null && list.size() > 0}">
							<c:forEach items="${list}" var="d" varStatus="st">
								<tr>
									<td style="text-align: center;"><span>${d.account}</span></td>
									<td style="text-align: center;"><span>${d.serviceName}</span></td>
									<td style="text-align: center;"><span>${d.apiName}</span></td>
									<td style="text-align: center;"><span>${d.exceptionMsg}</span></td>
									<td style="text-align: center;"><span><fmt:formatDate value='${d.createTime}' pattern='yyyy-MM-dd HH:mm:ss'/></span></td>
								</tr>
							</c:forEach>
						</c:if>
						<c:if test="${list == null || list.size() <= 0}">
							<tr>
								<td colspan="5" style="padding: 5px; text-align: center;">查询无记录！</td>
							</tr>
						</c:if>
					</tbody>
				</table>
				<%@include file="../common/page.jsp" %>
			</div>
		</div>
	</div>
	<script type="text/javascript">
	var formJsion = $("#query-form-1").serializeArray();
	new Pagination({container: '.page',fm: "#query-form-1",formData:formJsion});
		var ctxt = "${pageContext.request.contextPath}";

		// 查询
		$('.btn-query').click(function() {
			$('#query-form-1').submit();
			formJsion = $("#query-form-1").serializeArray();
		});

		// 重置
		$('.btn-rest').click(function() {
			window.location.href = $('#query-form-1').attr("action");
		});

		//下拉框初始化图形
		$(".chosen-select").chosen({disable_search_threshold: 10});

	</script>
</body>
